#pragma once
#include "fmod.h" //FMOD Ex
#include "assert.h"


class Sound
{
private:
	static bool sEnabled; //Is the sound Enabled?
	static char *sCurrentSound; //current sound to play
//FMOD system stuff
	static FMOD_RESULT sResult;
	static FMOD_SYSTEM *sFmodSystem;
	static FMOD_SOUND *sSound;
	static FMOD_CHANNEL *sChannel;

public:
	static void Init();
	static void Update();
//Sound Control
	static void SetVolume(float vol); //Sets the volume of the playing sound
	static void Load(const char *filename);
	static void Unload();
	static void Play(bool pause);
//getters
	static bool GetSoundState (); //checks whether the sound is on
	static char* GetCurrentSound();
//setters
	static void SetPause (bool pause); //pause or unpause the sound
	static void SetSound (bool sound); //set the sound on or off


//toggles
	static void ToggleSound (); //toggles sound on and off
	static void TogglePause (); //toggle pause on/off


//something
	static FMOD_SYSTEM* GetSystem();
};

class SoundEffect
{
private:
	bool bEnabled;
	char* mSoundName;
	FMOD_SOUND* mSound;
	FMOD_RESULT mResult;

public:
	SoundEffect(char* filename);
	void Play();
};